.NET Framework Class Library |
TaskFactory<(Of <(TResult>)>) Constructor (TaskScheduler) |
TaskFactory<(Of <(TResult>)>) Class See Also Send Feedback |
Initializes a TaskFactory<(Of <(TResult>)>) instance with the specified configuration.
Namespace:
System.Threading.Tasks
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Sub New ( _ scheduler As TaskScheduler _ ) |
C# |
---|
public TaskFactory( TaskScheduler scheduler ) |
Parameters
- scheduler
- Type: System.Threading.Tasks..::.TaskScheduler
The TaskScheduler to use to schedule any tasks created with this TaskFactory{TResult}. A null value indicates that the current TaskScheduler should be used.
Remarks
With this constructor, the
TaskCreationOptions property is initialized to
TaskCreationOptions.None, the
TaskContinuationOptions property is initialized to TaskContinuationOptions.None,
and the TaskScheduler property is
initialized to scheduler, unless it's null, in which case the property is
initialized to the current scheduler (see TaskScheduler.Current).